<?php
if($this->session->userdata('id')){
       $this->load->view('includes/header');
       ?>
<body>
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="#">CIEP - Controle de Atendimento</a>
          <div class="btn-group pull-right">
			<a class="btn" href="my-profile.html"><i class="icon-user"></i><?=$this->session->userdata('usuario')?></a>
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
			  <li><a href="my-profile.html">Profile</a></li>
              <li class="divider"></li>
              <li><?=anchor(base_url()."principalcontroller/logout","Sair");?></li>
            </ul>
          </div>
          <div class="nav-collapse">
            <ul class="nav">
			<li><a href="index.html">Home</a></li>
              <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Atendimento <b class="caret"></b></a>
				<ul class="dropdown-menu">
                                    <li><?=anchor(base_url()."atendimentocontroller/adicionarAtendimento","Adicionar");?></li>
					<li class="divider"></li>
                                        <li><?=anchor(base_url()."calendariocontroller/hoje","HOJE");?></li>
                                        <li class="divider"></li>
                                        <li><?=anchor(base_url()."calendariocontroller/calendario/atendimento","DATA");?></li>
                                        <li class="divider"></li>
					<li><a href="users.html">Data</a></li>
				</ul>
			  </li>
              <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Relatórios <b class="caret"></b></a>
				<ul class="dropdown-menu">
					<li><a href="new-role.html">New Role</a></li>
					<li class="divider"></li>
					<li><a href="roles.html">Manage Roles</a></li>
				</ul>
			  </li>
			  <li><a href="stats.html">Stats</a></li>
            </ul>
          </div>
        </div>
      </div>
    </div>

    <div class="container-fluid">
      <div class="row-fluid">
        <div class="span2">
          <div class="well sidebar-nav">
            <ul class="nav nav-list">
              <li class="nav-header"><i class="icon-user"></i> Cliente</li>
              <li><?=anchor(base_url()."clientecontroller/cadastrarCliente","Adicionar");?></li>
              <li><?=anchor(base_url()."clientecontroller/listarCliente","Listar");?></li>
              <li class="nav-header"><i class="icon-inbox"></i> Credor</li>
              <li><a href="stats.html">Adicionar</a></li>
              <li><a href="user-stats.html">Editar</a></li>
              <li><a href="visitor-stats.html">Listar</a></li>
              <li class="nav-header"><i class="icon-calendar"></i> Contas</li>
              <li><a href="my-profile.html">Adicionar</a></li>
              <li><a href="#">Editar</a></li>
              <li><a href="#">Listar</a></li> 
               <li class="nav-header"><i class="icon-calendar"></i> Contas à Pagar</li>
               <li><a href="my-profile.html">Adicionar</a></li>
              <li><a href="#">Editar</a></li>
              <li><a href="#">Listar</a></li>
              <li class="nav-header"><i class="icon-calendar"></i> Contas à Receber</li>
               <li><a href="my-profile.html">Adicionar</a></li>
              <li><a href="#">Editar</a></li>
              <li><a href="#">Listar</a></li>
            </ul>
          </div>
        </div>
          <?php
       if($tela == 'principal')
       {
       }
       $this->load->view('administracao/telas/'.$tela);?>
           </div>

      <hr>
       <footer class="well">
        &copy; Strass <p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
 </footer>

    </div>

       <?php
       $this->load->view('includes/footer');
}
else{
    redirect("principalcontroller");
}
?>

